package com.cf.game.msg;

/**
 * boot-awm-Response
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/26 下午 06:09
 */
public class Response {

    /**
     * 接收的用户
     */
    private long userId;

    /**
     * 消息码
     */
    private int code;

    /**
     * 消息信息
     */
    private String msg;

    
    public Response() {
    }

    public Response(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Response(long userId, int code, String msg) {
        this.userId = userId;
        this.code = code;
        this.msg = msg;
    }

    /**
     * 实例化response
     *
     * @param code
     * @param msg
     * @return
     */
    public static Response instance(long userId, int code, String msg) {
        Response response = new Response(userId, code, msg);
        return response;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }
}
